<%@ page language="java" contentType="text/html; charset=EUC-KR"
	pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>

<!-- IMPORT CSS       -->
<link rel="stylesheet" type="text/css" href="default.css" />

<style type="text/css">
/* YOU CAN ADD EVERY CSS STYLES HERE !!!! 
                        * I WILL WRAP ALL THIS UP TO ONE CSS FILE LATER
            */
#login {
	margin-left: auto;
	margin-right: auto;
	width: 480px;
}

#welcomeContent {
	text-align: center;
	width: 100%;
}
</style>





<!-- JQUERY LOGIN -->
<link rel="stylesheet" type="text/css" href="./design/style.css" />
<link href="ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"
	rel="stylesheet" type="text/css" />
<script src="ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
	!window.jQuery
			&& document
					.write('<script src="plugin/fancybox/jquery-1.4.3.min.js"><\/script>');
</script>

<script type="text/javascript"
	src="plugin/fancybox/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript"
	src="plugin/fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript"
	src="plugin/fancybox/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<link rel="stylesheet" type="text/css"
	href="plugin/fancybox/fancybox/jquery.fancybox-1.3.4.css"
	media="screen" />
<script type="text/javascript">
	$(document).ready(function() {
		$.ajax({
			url : "./autocomplete",
			data : "keyword=name",
			dataType : "json",
			type : "GET",
			contentType : "application/json; charset=utf-8",
			success : function(jsonResp) {
				$("input#name").autocomplete({
					source : jsonResp.list
				});
			}
		});

		$.ajax({
			url : "./autocomplete",
			data : "keyword=location",
			dataType : "json",
			type : "GET",
			contentType : "application/json; charset=utf-8",
			success : function(jsonResp) {
				$("input#location").autocomplete({
					source : jsonResp.list
				});
			}
		});
	});
	function login() {
		$.fancybox({
			href : "./login.jsp",
			onClosed : function() {
				parent.location.reload(false);
			}
		});
	}
	function searchByName() {
		document.getElementById('searchByName').style.display = "block";
		document.getElementById('searchByLocation').style.display = "none";
		document.getElementById('searchByRoom').style.display = "none";
	}
	function searchByLocation() {
		document.getElementById('searchByLocation').style.display = "block";
		document.getElementById('searchByName').style.display = "none";
		document.getElementById('searchByRoom').style.display = "none";
	}
	function searchByRoom() {
		document.getElementById('searchByRoom').style.display = "block";
		document.getElementById('searchByName').style.display = "none";
		document.getElementById('searchByLocation').style.display = "none";
	}
</script>

</head>
<body>
	<div id="wrapper">
		<div id="header">
			<%@include file="header.html"%>
		</div>
		<div id="container">
			<%
				String[] login = (String[]) session.getAttribute("login");
				if (login == null) {
					out.println("<li><a id=\"login\" href=\"javascript:login();\">Login</a></li>");
				} else {
					out.println("<li><a href=\"./reservation.jsp\">Reservation</a></li>");
					if (login[3].compareTo("M") == 0) {
						out.println("<li><a href=\"./hotel.jsp\">Hotel</a></li>");
					} else {
					}
					out.println("<li><a href=\"./logout\">Logout</a></li>");
				}
			%>
			<div id="welcomeContent" class="content min-width min-height">
				<img alt="Welcome!" src="images/welcome.jpg" width="480px" /><br />
				Welcome,

				<%--<%
                     //controllers.PersonsJpaController c = new controllers.PersonsJpaController();
                     //out.print(c.getPersonsCount());
                     //c.findPersons(id);
                        //   .find(session.getAttribute("ssn"))).getLastName()--%>
				<br />

			</div>
			<!-- login end -->

		</div>
		<!-- content min-height min-width -->
	</div>
	<!-- container end -->

	<div id="footer">
		<%@include file="footer.html"%>
	</div>
	</div>
	<!-- wrapper end -->
</body>
</html>